package FIT::Document::Handler::Skip;

use FIT::Class;
use FIT::Util::SpecialChars;
use FIT::Document::Transformer;

extends 'FIT::Document::Handler::Base';

sub handle {
    my ($fixture, $element, @handlers) = @_;

    if ($element->detect_mark($MARKER_SKIP)) {
        transform { Skip } $element;
        return;
    }

    $self->run_next_handler($fixture, $element, @handlers);
}


=head1 NAME

FIT::Document::Handler::Skip - look for skip markers and stop handling if found


=head1 DESCRIPTION

This handler lets you add a skip marker to an element. This will stop
processing, in a way that depends on where the marker was found:

=over 4

=item *

Table: the entire table is skipped

=item *

First cell in a row: the entire row is skipped

=item *

Other cell: only that cell is skipped

=back

=cut

